package cn.buglife.springboot.controller.content;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 将置于Spring MVC的model里的内容展示在模版html文件中
 * <p/>
 * Created by CrazyHarry on 2015/8/6.
 */
@Controller
public class ExampleContentController {

    /**
     * 根据Id获取某个Example的名称
     *
     * @param model
     * @return
     */
    @RequestMapping(value = "/example")
    public String get(Model model) {
        model.addAttribute("name", "example");
        return "example";
    }

//    public static void main(String[] args) {
//        SpringApplication.run(ExampleContentController.class, args);
//    }
}
